package com.example.common.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Email;
import javax.validation.constraints.Size;
import java.math.BigDecimal;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class User {
    private Integer id;

    @Size(min = 3, max = 15, message = "账号长度为 3-15 个字符")
    private String account;

    @Size(min = 6, max = 20, message = "密码长度为 6-20 个字符")
    private String password;

    @Email(message = "邮箱地址不合法")
    private String email;

    private String realName;

    private String phone;

    private Integer age;

    private String gender;

    private Date birth;

    private String company;

    private String avatar;

    private String address;

    private String province;

    private String city;

    private String area;

    private String idCard;

    private BigDecimal balance;

    private BigDecimal frozenAmount;

    private String payPassword;

    private Integer quotaId;
    private BigDecimal remainQuota;//所剩额度

    private Integer integral;

    private Integer reputationId;

    private Integer memberType;

    private String invitationCode;

    private String status;

    private String isDelete;

    public User(String isDelete) {
        this.isDelete = isDelete;
    }

//    public User(Integer id, String account,
//                String password, String email,
//                String phone, String realName,
//                Integer age, String gender,
//                Date birth, String company,
//                String avatar, String address,
//                String province, String city,
//                String area, String idCard,
//                BigDecimal balance, BigDecimal frozenAmount,
//                String payPassword, Integer quotaId,
//                BigDecimal remainQuota, Integer integral,
//                Integer reputationId, Integer memberType,
//                String invitationCode, String status,
//                String isDelete) {
//        this.id = id;
//        this.account = account;
//        this.password = password;
//        this.email = email;
//        this.phone = phone;
//        this.realName = realName;
//        this.age = age;
//        this.gender = gender;
//        this.birth = birth;
//        this.company = company;
//        this.avatar = avatar;
//        this.address = address;
//        this.province = province;
//        this.city = city;
//        this.area = area;
//        this.idCard = idCard;
//        this.balance = balance;
//        this.frozenAmount = frozenAmount;
//        this.payPassword = payPassword;
//        this.quotaId = quotaId;
//        this.remainQuota = remainQuota;
//        this.integral = integral;
//        this.reputationId = reputationId;
//        this.memberType = memberType;
//        this.invitationCode = invitationCode;
//        this.status = status;
//        this.isDelete = isDelete;
//    }
}
